package com.chaopei.constructor;

/**
 * @Author Corday 天涯
 * @Date 2022/3/4 14:09
 */
public class Flower {//封装的应用
//    属性添加private
    private String name;
    private double value;
    private  String color;
    public  Flower(){}

    public Flower(String name, double value, String color) {
        this.name = name;
        this.value = value;
        this.color = color;
    }
//    提供set/get方法让外部调用
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
